<admintpl file="header" />
<style>
	*{margin:0; padding:0;}
	body{font-family: "Microsoft Yahei", "hiragino sans gb", Helvetica, Arial, Tahoma;}
	.shdo{position: fixed; left:0; top:0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 10; display: none;}
	.stan-box{padding:10px 20px; width: 400px; max-height: 500px; background: #fff; position: fixed; left:100px; top:100px; z-index: 11; display: none;}
	.simgBox{max-height: 440px; overflow: auto; text-align: center;}
	.simgBox img{}
	.stit{height: 30px;}
	.stit .yuan{font-size: 14px;}
	.stit .cuo{display: block; width: 20px; height: 20px; color: #fff; background: #007aff; line-height: 20px; text-align: center; position: absolute; right:0; top:0; cursor: pointer;}
	.sbot{height: 30px; }
	.sbot span{height: 26px; line-height: 26px; width: 50px; font-size: 12px; color: #fff;  background: #007aff;  float: right; text-align: center; border-radius: 2px;margin-top: 6px; cursor: pointer;}
	.tanimg{cursor:pointer;}
</style>
</head>
<body>
<div class="wrap js-check-wrap">
	<ul class="nav nav-tabs">
		<li class="active"><a>字典类型</a></li>
        <li class=""><a href="{:U('Dictype/add')}">字典类型添加</a></li>
	</ul>
	<form class="js-ajax-form" method="post">
		<table class="table table-hover table-bordered" style="height:50px">
			<tr>
				<td>字典类型名称：
					<input type="text" name="name" style="width: 150px;" value="{:I('request.name')}" placeholder="请输入字典类型名称">
				</td>
				<td>字典类型标识：
					<input type="text" name="enname" style="width: 150px;" value="{:I('request.enname')}" placeholder="请输入字典类型标识">
				</td>
			</tr>
			<tr>
				<td colspan='2'>
					<input type="submit" class="btn btn-primary" value="搜索" />
					<a class="btn btn-danger" href="{:U('Dictype/index')}">清空</a>
					<button class="btn btn-success js-ajax-submit" type="submit" data-action="{:U('Dictype/dodicte')}">生成字典</button>
				</td>
			</tr>
		</table>
		<table class="table table-hover table-bordered table-list">
			<div class="table-actions">
				<button class="btn btn-success btn-small js-ajax-submit" type="submit" data-action="{:U('Dictype/toggle',array('display'=>1))}" data-subcheck="true">启用</button>
				<button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('Dictype/toggle',array('hide'=>1))}" data-subcheck="true">禁用</button>
			</div>
			<thead>
			<tr>
				<th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
				<th align="center">ID</th>
				<th align="center">字典类型名称</th>
				<th align="center">字典类型标识</th>
				<th align="center">创建时间</th>
				<th align="center">状态</th>
				<th align="center">操作</th>
			</tr>
			</thead>
			<tbody>
			<php>if(!empty($existdata)):</php>
			<foreach name="dictype" item="vo">
				<tr>
					<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}"></td>
					<td>{$vo.id}</td>
					<td>{$vo.name}</td>
					<td>{$vo.enname}</td>
					<td><php>echo date("Y-m-d H:i:s",strtotime($vo['create_time']));</php></td>
					<td>
						<php>
							if($vo['status'] == 1){
								echo "启用";
							} else{
								echo "禁用";
							}
						</php>
					</td>
					<td align="center">
							<a href="{:U('Dictype/edit',array('id'=>$vo['id']))}">编辑</a> |
							<a href="{:U('Dic/index',array('id'=>$vo['id']))}">字典管理</a><!--  |
							<a href="{:U('Dictype/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:L('DELETE')}</a> -->
					</td>
				</tr>
			</foreach>
			<php>else:</php>
			<tr>
				<td style="text-align: center;" colspan="10">未搜索到相关数据</td>
			</tr>
			<php>endif;</php>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</form>
	<div>
		<div class="shdo"></div>
		<div class="stan-box">
			<div class="stit">
				<span class="yuan">原始大小</span>
				<span class="cuo">×</span>
			</div>
			<div class="simgBox">
				<img id="showImg" src="" alt=""/>
			</div>
			<div class="sbot">
				<span>关闭</span>
			</div>
		</div>
	</div>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
	$(".tanimg").click(function(){
		$("#showImg").attr("src",$(this).attr("src"));
		$(".stan-box").css({"left":($(window).width()-$(".stan-box").outerWidth())/2,"top":($(window).height()-$(".stan-box").outerHeight())/2});
		$(".shdo").show();
		$(".stan-box").show();
	})
	$(".sbot,.cuo").click(function(){
		$(".shdo").hide();
		$(".stan-box").hide();
	})
</script>
</body>
</html>